package com.app.model;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 *
 * 益联券记录表
 * @author 16693103420
 * @since 2024-01-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_voucher_record")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class VoucherRecordModel implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//积分表ID
    private String name;//名称
    private String content;//内容
    private String typeName;//积分记录类型  1.消费 2.取消订单 3.抽奖 4.转账
    private String voucher;//积分加或者减
    private Integer userId;//用户ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;
    /**
     * 订单id
     */
    private String orderId;
    /**
     * 用户手机号
     */
    private transient String phone;

    /**
     * 商家id
     */
    private Integer businessId;


    private Integer voucherType;

    private Integer writeOff;

    private Double voucherAmount;
    private BigDecimal fees;

    private String extraType;
    @TableField(exist = false)
    private String  nickName;

    @TableField(exist = false)
    private String  mobile;
}
